﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

using SunXNA.RainbowXNA;

namespace Darwin.Source.Components.World.Entities
{
    public enum eResourceState
    {
        _CONTAINS,
        _EMPTY
    }

    public enum eResourceType
    {
        _Wood,
        _Stone,
        _Gold
    }

    class CBaseResource
    {
        protected int m_iHealth;
        protected Vector3 m_v3Position;
        protected eResourceState m_rsResourceState;
        protected CRainbowXNA.CRenderInstance m_instance;

        protected eResourceType m_Type;

        public CBaseResource(CRainbowXNA.RenderObjectHandleType handle,eResourceType type, Vector3 Position)
        {
            m_iHealth = 100;
            m_v3Position = Position;
            m_rsResourceState = eResourceState._CONTAINS;

            m_Type = type;

            m_instance = Singleton<CRainbowXNA>.Instance.CreateRenderInstance(handle);
            m_instance.CreateWorld(m_v3Position, Vector3.UnitZ, Vector3.One);
        }

        public virtual void DoRender()
        {
            Singleton<CRainbowXNA>.Instance.AddPotentialVisibleObject(m_instance);
        }

        public int Health
        {
            get { return m_iHealth; }
            set { m_iHealth = value; }
        }

        public Vector3 Position
        {
            get { return m_v3Position; }
            set { m_v3Position = value; }
        }
        
    }
}
